package eva.savant.businessobject.gl;

import eva.savant.businessobject.mt.Centro;
import javax.persistence.*;
import java.util.Collection;

@Table(name="GL_DIVISION")
@javax.persistence.Entity(name = "gl.Division")
public class Division extends eva.savant.businessobject.Entity {

    @Id
    @Column(name = "ID_DIVISION", length = 4, nullable = false)
    private String id; //ID Division

    @Basic
    @Column(name = "CODIGO", length = 2, nullable = false)
    private String codigo; //Codigo

    @Basic
    @Column(name = "NOMBRE", length = 30, nullable = false)
    private String nombre; //Nombre

    @OneToMany
    (mappedBy = "division")
    private Collection<Persona> lsPersona;

    @OneToMany
    (mappedBy = "division")
    private Collection<Centro> lsCentro;


    public Division(String id, String codigo, String nombre, Integer operacionId, String sociedadId, Integer usuarioId) {

        this.id= id;

        this.codigo= codigo;

        this.nombre= nombre;

        this.operacionId= operacionId;

        this.sociedadId= sociedadId;

        this.usuarioId= usuarioId;

    }

    public Division() {

    }


    public String getId() {
    
        return id;
    }
    
    public void setId(String id) {
    
        this.id = id;
    }

    public String getCodigo() {
    
        return codigo;
    }
    
    public void setCodigo(String codigo) {
    
        this.codigo = codigo;
    }

    public String getNombre() {
    
        return nombre;
    }
    
    public void setNombre(String nombre) {
    
        this.nombre = nombre;
    }

    public Collection<Persona> getLsPersona() {
    
        return lsPersona;
    }
    
    public void setLsPersona(Collection<Persona> lsPersona) {
    
        this.lsPersona = lsPersona;
    }

    public Collection<Centro> getLsCentro() {
    
        return lsCentro;
    }
    
    public void setLsCentro(Collection<Centro> lsCentro) {
    
        this.lsCentro = lsCentro;
    }

}
